<template>
	<div class="add_modify_container">
		<!-- 步骤条 -->
		<el-breadcrumb separator="/">
			<el-breadcrumb-item>轮播图</el-breadcrumb-item>
			<el-breadcrumb-item>轮播图--管理</el-breadcrumb-item>
			<el-breadcrumb-item>{{ (swiper_id === 0)?'添加轮播图':'修改轮播图' }}</el-breadcrumb-item>
		</el-breadcrumb>

		<!-- 添加轮播图 -->
		<el-card class="add_swiper_card">
			<!-- title -->
			<el-row class="title">
				<el-col>添加轮播图</el-col>
			</el-row>

			<!-- 主体内容 -->
			<div class="add_swiper_content">
				<el-form :model="ruleForm" ref="ruleForm" :rules="rules" class="demo-ruleForm" label-width="100px">
					<el-form-item label="活动名称:" prop="name">
						<el-input class="w300" placeholder="请输入轮播图的名称" v-model="ruleForm.name"></el-input>
					</el-form-item>

					<el-form-item label="图片:">
						<el-upload action="http://up-z2.qiniup.com" :limit="1" :file-list="imgList" list-type="picture-card" :on-preview="descPictureCardPreview" :on-remove="descRemove" :on-success="descAvatarSuccess" :on-error="descError" :on-exceed="descExceed" :data="postData">
							<i class="el-icon-plus"></i>
						</el-upload>
						<!--<p class="disc">图片尺寸750 X 900</p>-->
						<el-dialog :visible.sync="desc_img">
							<img width="100%" :src="descImageUrl" alt="">
						</el-dialog>
					</el-form-item>

					<el-form-item label="排序:">
						<el-input class="w300" placeholder="请填写排序" v-model="ruleForm.sort"></el-input>
					</el-form-item>

					<el-form-item label="URL:">
						<el-input class="w300" placeholder="请填写小程序链接地址" v-model="ruleForm.link"></el-input>
					</el-form-item>

					<el-form-item label="状态:">
						<template>
							<el-radio v-model="ruleForm.radio" label="1">开启</el-radio>
							<el-radio v-model="ruleForm.radio" label="2">关闭</el-radio>
						</template>
					</el-form-item>

					<el-form-item>
						<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
						<el-button>返回</el-button>
					</el-form-item>
				</el-form>
			</div>


		</el-card>

	</div>
</template>

<script src="../../../static/js/sowing/add_swiper.js"></script>

<style scoped>
@import "../../../static/css/sowing/add_modify.css";
</style>
